<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<style type="text/css">

.nav > li .dropdown-menu {  
            margin: 0;  
        }  
        .nav > li:hover .dropdown-menu {  
            display: block;  
        }  
  
        .dropdown-menu{  
            border-radius: 3;  
        }  
        a:hover{  
            background-color: rgba(45, 182, 224, 0.09) !important;  
        } 
        li{
        	float:left;
        } 
</style>
<script type="text/javascript">
	$(function(){
		$.post("${ pageContext.request.contextPath }/BookCategoryServlet",{"method":"findAll"},function(data){
			$(data).each(function(i,n){
				$("#menuID").append("<li><a href='${ pageContext.request.contextPath }/BookServlet?book_category_id="+n.category_id+"&method=findByBook_category_id&currPage=1'>"+n.category_name+"</a></li>");
			});
		},"json");
	});

</script>
<style>
	#bo{
display:inline-block;
width:100%;/*图片自适应的父容器的宽*/
height:100%;/*图片自适应的父容器的高*/
}
#bo img{
width:100%;
height:100%;
 
	}
</style>

	
			<!--
            	时间：2015-12-30
            	描述：菜单栏
            -->
			<div class="container-fluid">
				 <%-- <div class="col-md-9">
					<img  src="${ pageContext.request.contextPath }/img/titles.jpg" />
				</div>  --%>
				 <%-- <div class="col-md-5 ">
					<img src="${ pageContext.request.contextPath }/img/header.png" />

				</div> --%>
				
				
				
				
				</div>
			</div>
			<!--
            	时间：2015-12-30
            	描述：导航条
            -->
			<div class="container-fluid">
				<nav class="navbar navbar-inverse">
					<div class="container-fluid">
						<div style="margin-left:10%">
							<ol class="list-inline" style="float:left">
							<c:if test="${not empty existUser }">
							<li>
					             <ul  class="nav " >  
					                <li class="dropdown"><span style="color: red">您好:${ existUser.user_name }  </span>
					                    <ul class="dropdown-menu">  
					                       <li><a href="${ pageContext.request.contextPath }/UserServlet?method=alterPasswordUI">修改密码</a></li>
					                    </ul>  
					                </li>  
					            </ul>   
							</li>
								<li><a href="${ pageContext.request.contextPath }/UserServlet?method=logOut">退出</a></li>
								<li><a href="${ pageContext.request.contextPath }/BookBorrowItemsServlet?method=findByUserId&currPage=1">图书订单</a></li>
								<li><a href="${ pageContext.request.contextPath }/jsp/cartforword.jsp">预约书单</a></li>
							   
							</c:if>	
							</ol>
						</div>
					
					<div style="margin-top:2%">
						<!-- Brand and toggle get grouped for better mobile display -->
						<div class="navbar-header">
							
							<a class="navbar-brand" href="${ pageContext.request.contextPath }/index.jsp">首页</a>
							<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
								<span class="sr-only">Toggle navigation</span>
								<span class="icon-bar"></span>
								<span class="icon-bar"></span>
								<span class="icon-bar"></span>
							</button>
					
					</div>
					



						<!-- Collect the nav links, forms, and other content for toggling -->
						<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
							<ul id="menuID" class="nav navbar-nav">
							
								<c:if test="${ empty existUser }">
								 <li><a  href="${ pageContext.request.contextPath }/UserServlet?method=loginUI"><span style="color:red">登录</span></a></li> 
									<%--	<li><a  href="${ pageContext.request.contextPath }/jsp/login.jsp"><font style="color:red">登录</font></a></li>--%>
							</c:if>
							</ul>
							
							<form class="navbar-form navbar-right" action="${ pageContext.request.contextPath }/BookServlet" method="post" role="search">
								<div class="form-group">
									<input type="hidden" name="method" value="searchBook" />
									<input type="hidden" name="currPage" value="1" />
									<input type="hidden" name="search" value="1" />
									<input type="text" name="book_name" class="form-control" value="${bookName}" placeholder="请输入图书名">
								</div>
								<button type="submit" class="btn btn-default">Submit</button>
								
							</form>
								
						</div>
					</div>
						<!-- /.navbar-collapse -->
					</div>
					
					<!-- /.container-fluid -->
				</nav>
			</div>